//
//  ACDiskCache.h
//  ACCache_Example
//
//  Created by autohome on 2021/8/7.
//  Copyright © 2021 CaiXiang. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ACDiskCache : NSObject
/*!
 @property
 @abstract 缓存有效时长，单位秒
 */
@property (nonatomic, assign) NSTimeInterval effectiveCacheTime;

+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;

- (nullable instancetype)initWithPath:(NSString *)path;

- (BOOL)containsObjectForKey:(NSString *)key;
- (nullable id)objectForKey:(NSString *)key;
- (void)setObject:(nullable id<NSCoding>)object forKey:(NSString *)key;
- (void)removeObjectForKey:(NSString *)key;
- (void)removeAllObjects;
- (void)setObjects:(NSArray<id<NSCoding>>*)objects forKeys:(NSArray <NSString *>*)keys;

@end


NS_ASSUME_NONNULL_END
